<?php

class RedCross_Gateway_Base_MembershipFee extends Doctrine_Record {
    public function setTableDefinition()
    {
        $this->setTableName('membership_fee');
        $this->hasColumn('id', 'integer', 4, array(
            'type' => 'integer',
            'primary' => true,
            'autoincrement' => true,
            'length' => 4,
        ));
        $this->hasColumn('member_id', 'integer', 4, array(
            'type' => 'integer',
            'primary' => true,
            'autoincrement' => true,
            'length' => 4,
        ));
        $this->hasColumn('year', 'integer', 4, array(
            'type' => 'integer',
            'primary' => true,
            'autoincrement' => true,
            'length' => 4,
        ));
        $this->hasColumn('date_paid', 'timestamp', null, array(
            'type' => 'timestamp',
        ));
    }

    public function setUp() 
    {
        parent::setUp();
        $this->hasOne('RedCross_Gateway_Base_Member as Member', array(
            'local' => 'member_id',
            'foreign' => 'id'
        ));
        $timestampable0 = new Doctrine_Template_Timestampable(array(
            'created' => array(
                'name' => 'date_paid',
                'type' => 'timestamp',
                'format' => 'Y-m-d H:i:s',
            ),
            'updated' => array('disabled' => true)
        ));
        $this->actAs($timestampable0);
    }
}

?>
